package com.huaguoguo.spring.util;

/**
 * description: 字符串工具类
 * author:huaguoguo
 * Date: 2018/12/9
 * Time: 17:11
 */
public class StringUtils {

    /**
     * 判断字符串不为空
     * @param string
     * @return
     */
    public static boolean isNotEmpty(String string){
        return string !=null && !string.isEmpty();
    }

    /**
     * 判断字符串为空
     * @param string
     * @return
     */
    public static boolean isEmpty(String string){
        return string ==null || string.isEmpty();
    }

    //首字母转小写
    public static String toLowerCaseFirstOne(String s){
        if(Character.isLowerCase(s.charAt(0))) {
            return s;
        } else {
            return (new StringBuilder()).append(Character.toLowerCase(s.charAt(0))).append(s.substring(1)).toString();
        }
    }
}
